<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="referrer" content="no-referrer">
	<meta name="viewport"
		  content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover">
	<script>
		document.addEventListener("DOMContentLoaded", function (event) {
			let params = parseQueryString(location.hash.substring(1))
			document.getElementById("message").textContent = decodeURIComponent(`${params.message}`)

			const schema = params.app === "mail" ? "tutanota" : "tutacalendar"
			confirm3ds2(decodeURIComponent(params.clientToken), decodeURIComponent(params.nonce), decodeURIComponent(params.bin), decodeURIComponent(params.price), decodeURIComponent(params.clientType), schema)
		});

		function confirm3ds2(clientToken, nonce, bin, price, clientType, schema) {
			// see https://braintree.github.io/braintree-web/current/ThreeDSecure.html#verifyCard
			braintree.threeDSecure.create({
				authorization: clientToken,
				version: 2
			}).then(threeDS => {
				return threeDS.verifyCard({
					onLookupComplete: function (data, next) {
						next()
					},
					amount: price,
					nonce: nonce,
					bin: bin,
					challengeRequested: true,
				})
			}).then((result) => {
				fetch(`${location.origin}/rest/sys/paymentdataservice`, {
					method: 'POST',
					headers: {
						'Content-Type': 'application/json'
					},
					body: JSON.stringify({
						_format: "0",
						braintree3dsResponse: {_id: "lq3tLw", clientToken, nonce: result.nonce}
					}) // body data type must match "Content-Type" header
				}).then(response => {
					document.getElementById("message").textContent = "Your payment details were successfully linked to your Tuta Mail account!"
					document.getElementById("message2").textContent = "You may close this tab and return to the app."
					// ClientType.App
					if (clientType === "2") window.location.href = `${schema}://app`;
					else window.close();
				})
			}).catch(e => {
				document.getElementById("message").textContent = "Sorry, the verification of your payment details was unsuccessful."
				document.getElementById("message2").textContent = "You may return to the app to see what went wrong."
				// ClientType.App
				if (clientType === "2") window.location.href = `${schema}://app`;
				else window.close();
			})
		}

		// from mithril
		var parseQueryString = function (string) {
			if (string === "" || string == null) return {}
			if (string.charAt(0) === "?") string = string.slice(1)
			var entries = string.split("&"), counters = {}, data0 = {}
			for (var i = 0; i < entries.length; i++) {
				var entry = entries[i].split("=")
				var key5 = decodeURIComponent(entry[0])
				var value2 = entry.length === 2 ? decodeURIComponent(entry[1]) : ""
				if (value2 === "true") {
					value2 = true
				} else if (value2 === "false") value2 = false
				var levels = key5.split(/\]\[?|\[/)
				var cursor = data0
				if (key5.indexOf("[") > -1) levels.pop()
				for (var j0 = 0; j0 < levels.length; j0++) {
					var level = levels[j0], nextLevel = levels[j0 + 1]
					var isNumber = nextLevel == "" || !isNaN(parseInt(nextLevel, 10))
					if (level === "") {
						var key5 = levels.slice(0, j0).join()
						if (counters[key5] == null) {
							counters[key5] = Array.isArray(cursor) ? cursor.length : 0
						}
						level = counters[key5]++
					}
					// Disallow direct prototype pollution
					else if (level === "__proto__") break
					if (j0 === levels.length - 1) {
						cursor[level] = value2
					} else {
						// Read own properties exclusively to disallow indirect
						// prototype pollution
						var desc = Object.getOwnPropertyDescriptor(cursor, level)
						if (desc != null) desc = desc.value
						if (desc == null) cursor[level] = desc = isNumber ? [] : {}
						cursor = desc
					}
				}
			}
			return data0
		}
	</script>
	<script>
		// https://js.braintreegateway.com/web/3.69.0/js/three-d-secure.min.js
		!function (e) {
			var t;
			"object" == typeof exports && "undefined" != typeof module ? module.exports = e() : "function" == typeof define && define.amd ? define([], e) : ((t = "undefined" != typeof window ? window : "undefined" != typeof global ? global : "undefined" != typeof self ? self : this).braintree || (t.braintree = {})).threeDSecure = e()
		}(function () {
			return function n(i, o, s) {
				function a(t, e) {
					if (!o[t]) {
						if (!i[t]) {
							var r = "function" == typeof require && require;
							if (!e && r) return r(t, !0);
							if (c) return c(t, !0);
							throw (r = new Error("Cannot find module '" + t + "'")).code = "MODULE_NOT_FOUND", r
						}
						r = o[t] = {exports: {}}, i[t][0].call(r.exports, function (e) {
							return a(i[t][1][e] || e)
						}, r, r.exports, n, i, o, s)
					}
					return o[t].exports
				}

				for (var c = "function" == typeof require && require, e = 0; e < s.length; e++) a(s[e]);
				return a
			}({
				1: [function (e, t, r) {
					"use strict";
					var n = this && this.__importDefault || function (e) {
						return e && e.__esModule ? e : {default: e}
					};
					Object.defineProperty(r, "__esModule", {value: !0}), r.PromiseGlobal = void 0;
					e = n(e("promise-polyfill")), e = "undefined" != typeof Promise ? Promise : e.default;
					r.PromiseGlobal = e
				}, {"promise-polyfill": 29}],
				2: [function (e, t, r) {
					"use strict";
					var s = e("./lib/promise"), a = {};

					function n(r) {
						var e, t = JSON.stringify(r);
						if (!r.forceScriptReload && (e = a[t])) return e;
						var n = document.createElement("script"), i = r.dataAttributes || {},
								o = r.container || document.head;
						return n.src = r.src, n.id = r.id || "", n.async = !0, r.crossorigin && n.setAttribute("crossorigin", "" + r.crossorigin), Object.keys(i).forEach(function (e) {
							n.setAttribute("data-" + e, "" + i[e])
						}), e = new s.PromiseGlobal(function (e, t) {
							n.addEventListener("load", function () {
								e(n)
							}), n.addEventListener("error", function () {
								t(new Error(r.src + " failed to load."))
							}), n.addEventListener("abort", function () {
								t(new Error(r.src + " has aborted."))
							}), o.appendChild(n)
						}), a[t] = e
					}

					n.clearCache = function () {
						a = {}
					}, t.exports = n
				}, {"./lib/promise": 1}],
				3: [function (e, t, r) {
					t.exports = e("./dist/load-script")
				}, {"./dist/load-script": 2}],
				4: [function (e, t, r) {
					"use strict";
					var n = (i.prototype.on = function (e, t) {
						this._events[e] ? this._events[e].push(t) : this._events[e] = [t]
					}, i.prototype.off = function (e, t) {
						e = this._events[e];
						e && (t = e.indexOf(t), e.splice(t, 1))
					}, i.prototype._emit = function (e) {
						for (var t = [], r = 1; r < arguments.length; r++) t[r - 1] = arguments[r];
						e = this._events[e];
						e && e.forEach(function (e) {
							e.apply(void 0, t)
						})
					}, i.prototype.hasListener = function (e) {
						e = this._events[e];
						return !!e && 0 < e.length
					}, i.createChild = function (e) {
						e.prototype = Object.create(i.prototype, {constructor: e})
					}, i);

					function i() {
						this._events = {}
					}

					t.exports = n
				}, {}],
				5: [function (e, t, r) {
					"use strict";
					var n = "undefined" != typeof Promise ? Promise : null, n = (i.defaultOnResolve = function (e) {
						return i.Promise.resolve(e)
					}, i.defaultOnReject = function (e) {
						return i.Promise.reject(e)
					}, i.setPromise = function (e) {
						i.Promise = e
					}, i.shouldCatchExceptions = function (e) {
						return e.hasOwnProperty("suppressUnhandledPromiseMessage") ? Boolean(e.suppressUnhandledPromiseMessage) : Boolean(i.suppressUnhandledPromiseMessage)
					}, i.all = function (e) {
						return i.Promise.all(e)
					}, i.allSettled = function (e) {
						return i.Promise.allSettled(e)
					}, i.race = function (e) {
						return i.Promise.race(e)
					}, i.reject = function (e) {
						return i.Promise.reject(e)
					}, i.resolve = function (e) {
						return i.Promise.resolve(e)
					}, i.prototype.then = function () {
						for (var e, t = [], r = 0; r < arguments.length; r++) t[r] = arguments[r];
						return (e = this._promise).then.apply(e, t)
					}, i.prototype.catch = function () {
						for (var e, t = [], r = 0; r < arguments.length; r++) t[r] = arguments[r];
						return (e = this._promise).catch.apply(e, t)
					}, i.prototype.resolve = function (e) {
						var t = this;
						return this.isFulfilled || (this._setResolved(), i.Promise.resolve().then(function () {
							return t._onResolve(e)
						}).then(function (e) {
							t._resolveFunction(e)
						}).catch(function (e) {
							t._resetState(), t.reject(e)
						})), this
					}, i.prototype.reject = function (e) {
						var t = this;
						return this.isFulfilled || (this._setRejected(), i.Promise.resolve().then(function () {
							return t._onReject(e)
						}).then(function (e) {
							t._setResolved(), t._resolveFunction(e)
						}).catch(function (e) {
							return t._rejectFunction(e)
						})), this
					}, i.prototype._resetState = function () {
						this.isFulfilled = !1, this.isResolved = !1, this.isRejected = !1
					}, i.prototype._setResolved = function () {
						this.isFulfilled = !0, this.isResolved = !0, this.isRejected = !1
					}, i.prototype._setRejected = function () {
						this.isFulfilled = !0, this.isResolved = !1, this.isRejected = !0
					}, i.Promise = n, i);

					function i(e) {
						var r = this;
						"function" != typeof e ? (this._promise = new i.Promise(function (e, t) {
							r._resolveFunction = e, r._rejectFunction = t
						}), e = e || {}, this._onResolve = e.onResolve || i.defaultOnResolve, this._onReject = e.onReject || i.defaultOnReject, i.shouldCatchExceptions(e) && this._promise.catch(function () {
						}), this._resetState()) : this._promise = new i.Promise(e)
					}

					t.exports = n
				}, {}],
				6: [function (e, t, r) {
					"use strict";
					var n = e("./lib/set-attributes"), i = e("./lib/default-attributes"), o = e("./lib/assign");
					t.exports = function (e) {
						void 0 === e && (e = {});
						var t = document.createElement("iframe"), e = o.assign({}, i.defaultAttributes, e);
						return e.style && "string" != typeof e.style && (o.assign(t.style, e.style), delete e.style), n.setAttributes(t, e), t.getAttribute("id") || (t.id = t.name), t
					}
				}, {"./lib/assign": 7, "./lib/default-attributes": 8, "./lib/set-attributes": 9}],
				7: [function (e, t, r) {
					"use strict";
					Object.defineProperty(r, "__esModule", {value: !0}), r.assign = void 0, r.assign = function (r) {
						for (var e = [], t = 1; t < arguments.length; t++) e[t - 1] = arguments[t];
						return e.forEach(function (t) {
							"object" == typeof t && Object.keys(t).forEach(function (e) {
								r[e] = t[e]
							})
						}), r
					}
				}, {}],
				8: [function (e, t, r) {
					"use strict";
					Object.defineProperty(r, "__esModule", {value: !0}), r.defaultAttributes = void 0, r.defaultAttributes = {
						src: "about:blank",
						frameBorder: 0,
						allowtransparency: !0,
						scrolling: "no"
					}
				}, {}],
				9: [function (e, t, r) {
					"use strict";
					Object.defineProperty(r, "__esModule", {value: !0}), r.setAttributes = void 0, r.setAttributes = function (e, t) {
						for (var r in t) {
							var n;
							t.hasOwnProperty(r) && (null == (n = t[r]) ? e.removeAttribute(r) : e.setAttribute(r, n))
						}
					}
				}, {}],
				10: [function (e, t, r) {
					"use strict";
					t.exports = function () {
						return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (e) {
							var t = 16 * Math.random() | 0;
							return ("x" === e ? t : 3 & t | 8).toString(16)
						})
					}
				}, {}],
				11: [function (e, t, r) {
					"use strict";
					Object.defineProperty(r, "__esModule", {value: !0}), r.deferred = function (r) {
						return function () {
							for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
							setTimeout(function () {
								try {
									r.apply(void 0, e)
								} catch (e) {
									console.log("Error in callback function"), console.log(e)
								}
							}, 1)
						}
					}
				}, {}],
				12: [function (e, t, r) {
					"use strict";
					Object.defineProperty(r, "__esModule", {value: !0}), r.once = function (r) {
						var n = !1;
						return function () {
							for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
							n || (n = !0, r.apply(void 0, e))
						}
					}
				}, {}],
				13: [function (e, t, r) {
					"use strict";
					Object.defineProperty(r, "__esModule", {value: !0}), r.promiseOrCallback = function (e, t) {
						if (!t) return e;
						e.then(function (e) {
							return t(null, e)
						}).catch(function (e) {
							return t(e)
						})
					}
				}, {}],
				14: [function (e, t, r) {
					"use strict";
					var i = e("./lib/deferred"), o = e("./lib/once"), s = e("./lib/promise-or-callback");

					function a(n) {
						return function () {
							for (var e, t = [], r = 0; r < arguments.length; r++) t[r] = arguments[r];
							return "function" == typeof t[t.length - 1] && (e = t.pop(), e = o.once(i.deferred(e))), s.promiseOrCallback(n.apply(this, t), e)
						}
					}

					a.wrapPrototype = function (n, e) {
						void 0 === e && (e = {});
						var i = e.ignoreMethods || [], o = !0 === e.transformPrivateMethods;
						return Object.getOwnPropertyNames(n.prototype).filter(function (e) {
							var t = "constructor" !== e && "function" == typeof n.prototype[e], r = -1 === i.indexOf(e),
									e = o || "_" !== e.charAt(0);
							return t && e && r
						}).forEach(function (e) {
							var t = n.prototype[e];
							n.prototype[e] = a(t)
						}), n
					}, t.exports = a
				}, {"./lib/deferred": 11, "./lib/once": 12, "./lib/promise-or-callback": 13}],
				15: [function (e, t, r) {
					"use strict";
					Object.defineProperty(r, "__esModule", {value: !0}), r.Framebus = void 0;
					var i = e("./lib/is-not-string"), a = e("./lib/subscription-args-invalid"),
							o = e("./lib/broadcast"), s = e("./lib/package-payload"), c = e("./lib/constants"),
							e = (n.target = function (e) {
								return new n(e)
							}, n.prototype.include = function (e) {
								return null != e && (null != e.Window && (e.constructor === e.Window && (c.childWindows.push(e), !0)))
							}, n.prototype.target = function (e) {
								return n.target(e)
							}, n.prototype.emit = function (e, t, r) {
								if (this.isDestroyed) return !1;
								var n = this.origin;
								if (e = this.namespaceEvent(e), i.isntString(e)) return !1;
								if (i.isntString(n)) return !1;
								"function" == typeof t && (r = t, t = void 0);
								r = s.packagePayload(e, n, t, r);
								return !!r && (o.broadcast(window.top || window.self, r, n), !0)
							}, n.prototype.on = function (e, r) {
								if (this.isDestroyed) return !1;
								var n = this, t = this.origin, i = r;
								return e = this.namespaceEvent(e), !a.subscriptionArgsInvalid(e, i, t) && (this.verifyDomain && (i = function () {
									for (var e = [], t = 0; t < arguments.length; t++) e[t] = arguments[t];
									n.checkOrigin(this && this.origin) && r.apply(void 0, e)
								}), this.listeners.push({
									eventName: e,
									handler: i,
									originalHandler: r
								}), c.subscribers[t] = c.subscribers[t] || {}, c.subscribers[t][e] = c.subscribers[t][e] || [], c.subscribers[t][e].push(i), !0)
							}, n.prototype.off = function (e, t) {
								var r = t;
								if (this.isDestroyed) return !1;
								if (this.verifyDomain) for (var n = 0; n < this.listeners.length; n++) {
									var i = this.listeners[n];
									i.originalHandler === t && (r = i.handler)
								}
								e = this.namespaceEvent(e);
								var o = this.origin;
								if (a.subscriptionArgsInvalid(e, r, o)) return !1;
								var s = c.subscribers[o] && c.subscribers[o][e];
								if (!s) return !1;
								for (n = 0; n < s.length; n++) if (s[n] === r) return s.splice(n, 1), !0;
								return !1
							}, n.prototype.teardown = function () {
								if (!this.isDestroyed) {
									this.isDestroyed = !0;
									for (var e = 0; e < this.listeners.length; e++) {
										var t = this.listeners[e];
										this.off(t.eventName, t.handler)
									}
									this.listeners.length = 0
								}
							}, n.prototype.checkOrigin = function (e) {
								var t, r = document.createElement("a");
								return r.href = location.href, t = "https:" === r.protocol ? r.host.replace(/:443$/, "") : "http:" === r.protocol ? r.host.replace(/:80$/, "") : r.host, r.protocol + "//" + t === e || (!this.verifyDomain || this.verifyDomain(e))
							}, n.prototype.namespaceEvent = function (e) {
								return this.channel ? this.channel + ":" + e : e
							}, n);

					function n(e) {
						void 0 === e && (e = {}), this.origin = e.origin || "*", this.channel = e.channel || "", this.verifyDomain = e.verifyDomain, this.isDestroyed = !1, this.listeners = []
					}

					r.Framebus = e
				}, {
					"./lib/broadcast": 19,
					"./lib/constants": 20,
					"./lib/is-not-string": 23,
					"./lib/package-payload": 25,
					"./lib/subscription-args-invalid": 27
				}],
				16: [function (e, t, r) {
					"use strict";
					var n = e("./lib/attach"), e = e("./framebus");
					n.attach(), t.exports = e.Framebus
				}, {"./framebus": 15, "./lib/attach": 17}],
				17: [function (e, t, r) {
					"use strict";
					Object.defineProperty(r, "__esModule", {value: !0}), r.detach = r.attach = void 0;
					var n = e("./message"), i = !1;
					r.attach = function () {
						i || "undefined" == typeof window || (i = !0, window.addEventListener("message", n.onmessage, !1))
					}, r.detach = function () {
						i = !1, window.removeEventListener("message", n.onmessage, !1)
					}
				}, {"./message": 24}],
				18: [function (e, t, r) {
					"use strict";
					Object.defineProperty(r, "__esModule", {value: !0}), r.broadcastToChildWindows = void 0;
					var o = e("./broadcast"), s = e("./constants");
					r.broadcastToChildWindows = function (e, t, r) {
						for (var n = s.childWindows.length - 1; 0 <= n; n--) {
							var i = s.childWindows[n];
							i.closed ? s.childWindows.splice(n, 1) : r !== i && o.broadcast(i.top, e, t)
						}
					}
				}, {"./broadcast": 19, "./constants": 20}],
				19: [function (e, t, r) {
					"use strict";
					Object.defineProperty(r, "__esModule", {value: !0}), r.broadcast = void 0;
					var s = e("./has-opener");
					r.broadcast = function e(t, r, n) {
						var i, o = 0;
						try {
							for (t.postMessage(r, n), s.hasOpener(t) && e(t.opener.top, r, n); i = t.frames[o];) e(i, r, n), o++
						} catch (e) {
						}
					}
				}, {"./has-opener": 22}],
				20: [function (e, t, r) {
					"use strict";
					Object.defineProperty(r, "__esModule", {value: !0}), r.subscribers = r.childWindows = r.prefix = void 0, r.prefix = "/*framebus*/", r.childWindows = [], r.subscribers = {}
				}, {}],
				21: [function (e, t, r) {
					"use strict";
					Object.defineProperty(r, "__esModule", {value: !0}), r.dispatch = void 0;
					var a = e("./constants");
					r.dispatch = function (e, t, r, n, i) {
						if (a.subscribers[e] && a.subscribers[e][t]) {
							var o = [];
							r && o.push(r), n && o.push(n);
							for (var s = 0; s < a.subscribers[e][t].length; s++) a.subscribers[e][t][s].apply(i, o)
						}
					}
				}, {"./constants": 20}],
				22: [function (e, t, r) {
					"use strict";
					Object.defineProperty(r, "__esModule", {value: !0}), r.hasOpener = void 0, r.hasOpener = function (e) {
						return e.top === e && (null != e.opener && (e.opener !== e && !0 !== e.opener.closed))
					}
				}, {}],
				23: [function (e, t, r) {
					"use strict";
					Object.defineProperty(r, "__esModule", {value: !0}), r.isntString = void 0, r.isntString = function (e) {
						return "string" != typeof e
					}
				}, {}],
				24: [function (e, t, r) {
					"use strict";
					Object.defineProperty(r, "__esModule", {value: !0}), r.onmessage = void 0;
					var i = e("./is-not-string"), o = e("./unpack-payload"), s = e("./dispatch"),
							a = e("./broadcast-to-child-windows");
					r.onmessage = function (e) {
						var t, r, n;
						i.isntString(e.data) || (t = o.unpackPayload(e)) && (r = t.eventData, n = t.reply, s.dispatch("*", t.event, r, n, e), s.dispatch(e.origin, t.event, r, n, e), a.broadcastToChildWindows(e.data, t.origin, e.source))
					}
				}, {
					"./broadcast-to-child-windows": 18,
					"./dispatch": 21,
					"./is-not-string": 23,
					"./unpack-payload": 28
				}],
				25: [function (e, t, r) {
					"use strict";
					Object.defineProperty(r, "__esModule", {value: !0}), r.packagePayload = void 0;
					var s = e("./subscribe-replier"), a = e("./constants");
					r.packagePayload = function (e, t, r, n) {
						var i, o = {event: e, origin: t};
						"function" == typeof n && (o.reply = s.subscribeReplier(n, t)), o.eventData = r;
						try {
							i = a.prefix + JSON.stringify(o)
						} catch (e) {
							throw new Error("Could not stringify event: " + e.message)
						}
						return i
					}
				}, {"./constants": 20, "./subscribe-replier": 26}],
				26: [function (e, t, r) {
					"use strict";
					var n = this && this.__importDefault || function (e) {
						return e && e.__esModule ? e : {default: e}
					};
					Object.defineProperty(r, "__esModule", {value: !0}), r.subscribeReplier = void 0;
					var s = e("../framebus"), a = n(e("@braintree/uuid"));
					r.subscribeReplier = function (n, i) {
						var o = a.default();
						return s.Framebus.target({origin: i}).on(o, function e(t, r) {
							n(t, r), s.Framebus.target({origin: i}).off(o, e)
						}), o
					}
				}, {"../framebus": 15, "@braintree/uuid": 10}],
				27: [function (e, t, r) {
					"use strict";
					Object.defineProperty(r, "__esModule", {value: !0}), r.subscriptionArgsInvalid = void 0;
					var n = e("./is-not-string");
					r.subscriptionArgsInvalid = function (e, t, r) {
						return !!n.isntString(e) || ("function" != typeof t || n.isntString(r))
					}
				}, {"./is-not-string": 23}],
				28: [function (e, t, r) {
					"use strict";
					Object.defineProperty(r, "__esModule", {value: !0}), r.unpackPayload = void 0;
					var o = e("./constants"), s = e("./package-payload");
					r.unpackPayload = function (e) {
						var t, r, n, i;
						if (e.data.slice(0, o.prefix.length) !== o.prefix) return !1;
						try {
							t = JSON.parse(e.data.slice(o.prefix.length))
						} catch (e) {
							return !1
						}
						return t.reply && (r = e.origin, n = e.source, i = t.reply, t.reply = function (e) {
							!n || (e = s.packagePayload(i, r, e)) && n.postMessage(e, r)
						}), t
					}
				}, {"./constants": 20, "./package-payload": 25}],
				29: [function (e, t, r) {
					"use strict";
					var n = setTimeout;

					function c(e) {
						return Boolean(e && void 0 !== e.length)
					}

					function i() {
					}

					function o(e) {
						if (!(this instanceof o)) throw new TypeError("Promises must be constructed via new");
						if ("function" != typeof e) throw new TypeError("not a function");
						this._state = 0, this._handled = !1, this._value = void 0, this._deferreds = [], p(e, this)
					}

					function s(r, n) {
						for (; 3 === r._state;) r = r._value;
						0 !== r._state ? (r._handled = !0, o._immediateFn(function () {
							var e, t = 1 === r._state ? n.onFulfilled : n.onRejected;
							if (null !== t) {
								try {
									e = t(r._value)
								} catch (e) {
									return void u(n.promise, e)
								}
								a(n.promise, e)
							} else (1 === r._state ? a : u)(n.promise, r._value)
						})) : r._deferreds.push(n)
					}

					function a(t, e) {
						try {
							if (e === t) throw new TypeError("A promise cannot be resolved with itself.");
							if (e && ("object" == typeof e || "function" == typeof e)) {
								var r = e.then;
								if (e instanceof o) return t._state = 3, t._value = e, void l(t);
								if ("function" == typeof r) return void p((n = r, i = e, function () {
									n.apply(i, arguments)
								}), t)
							}
							t._state = 1, t._value = e, l(t)
						} catch (e) {
							u(t, e)
						}
						var n, i
					}

					function u(e, t) {
						e._state = 2, e._value = t, l(e)
					}

					function l(e) {
						2 === e._state && 0 === e._deferreds.length && o._immediateFn(function () {
							e._handled || o._unhandledRejectionFn(e._value)
						});
						for (var t = 0, r = e._deferreds.length; t < r; t++) s(e, e._deferreds[t]);
						e._deferreds = null
					}

					function d(e, t, r) {
						this.onFulfilled = "function" == typeof e ? e : null, this.onRejected = "function" == typeof t ? t : null, this.promise = r
					}

					function p(e, t) {
						var r = !1;
						try {
							e(function (e) {
								r || (r = !0, a(t, e))
							}, function (e) {
								r || (r = !0, u(t, e))
							})
						} catch (e) {
							if (r) return;
							r = !0, u(t, e)
						}
					}

					o.prototype.catch = function (e) {
						return this.then(null, e)
					}, o.prototype.then = function (e, t) {
						var r = new this.constructor(i);
						return s(this, new d(e, t, r)), r
					}, o.prototype.finally = function (t) {
						var r = this.constructor;
						return this.then(function (e) {
							return r.resolve(t()).then(function () {
								return e
							})
						}, function (e) {
							return r.resolve(t()).then(function () {
								return r.reject(e)
							})
						})
					}, o.all = function (t) {
						return new o(function (i, o) {
							if (!c(t)) return o(new TypeError("Promise.all accepts an array"));
							var s = Array.prototype.slice.call(t);
							if (0 === s.length) return i([]);
							var a = s.length;
							for (var e = 0; e < s.length; e++) !function t(r, e) {
								try {
									if (e && ("object" == typeof e || "function" == typeof e)) {
										var n = e.then;
										if ("function" == typeof n) return void n.call(e, function (e) {
											t(r, e)
										}, o)
									}
									s[r] = e, 0 == --a && i(s)
								} catch (e) {
									o(e)
								}
							}(e, s[e])
						})
					}, o.resolve = function (t) {
						return t && "object" == typeof t && t.constructor === o ? t : new o(function (e) {
							e(t)
						})
					}, o.reject = function (r) {
						return new o(function (e, t) {
							t(r)
						})
					}, o.race = function (i) {
						return new o(function (e, t) {
							if (!c(i)) return t(new TypeError("Promise.race accepts an array"));
							for (var r = 0, n = i.length; r < n; r++) o.resolve(i[r]).then(e, t)
						})
					}, o._immediateFn = "function" == typeof setImmediate ? function (e) {
						setImmediate(e)
					} : function (e) {
						n(e, 0)
					}, o._unhandledRejectionFn = function (e) {
						"undefined" != typeof console && console && console.warn("Possible Unhandled Promise Rejection:", e)
					}, t.exports = o
				}, {}],
				30: [function (e, t, r) {
					"use strict";
					var o = e("./create-authorization-data"), s = e("./json-clone"), a = e("./constants");
					t.exports = function (e, t) {
						var r, n = t ? s(t) : {}, t = o(e.authorization).attrs, i = s(e.analyticsMetadata);
						for (r in n.braintreeLibraryVersion = a.BRAINTREE_LIBRARY_VERSION, n._meta) n._meta.hasOwnProperty(r) && (i[r] = n._meta[r]);
						return n._meta = i, t.tokenizationKey ? n.tokenizationKey = t.tokenizationKey : n.authorizationFingerprint = t.authorizationFingerprint, n
					}
				}, {"./constants": 36, "./create-authorization-data": 40, "./json-clone": 47}],
				31: [function (e, t, r) {
					"use strict";
					var n = e("./promise"), a = e("./constants"), c = e("./add-metadata");
					t.exports = {
						sendEvent: function (e, i, o) {
							var s = Date.now();
							return n.resolve(e).then(function (e) {
								var t = Date.now(), r = e.getConfiguration(), n = e._request,
										e = r.gatewayConfiguration.analytics.url, t = {
											analytics: [{
												kind: a.ANALYTICS_PREFIX + i,
												isAsync: Math.floor(t / 1e3) !== Math.floor(s / 1e3),
												timestamp: s
											}]
										};
								n({url: e, method: "post", data: c(r, t), timeout: a.ANALYTICS_REQUEST_TIMEOUT_MS}, o)
							})
						}
					}
				}, {"./add-metadata": 30, "./constants": 36, "./promise": 49}],
				32: [function (e, t, r) {
					"use strict";
					e = e("@braintree/asset-loader/load-script");
					t.exports = {loadScript: e}
				}, {"@braintree/asset-loader/load-script": 3}],
				33: [function (e, t, r) {
					"use strict";
					var n = "function" == typeof Object.assign ? Object.assign : i;

					function i(e) {
						for (var t, r, n = 1; n < arguments.length; n++) for (r in t = arguments[n]) t.hasOwnProperty(r) && (e[r] = t[r]);
						return e
					}

					t.exports = {assign: n, _assign: i}
				}, {}],
				34: [function (e, t, r) {
					"use strict";
					var n = e("./braintree-error"), i = e("./promise"), o = e("./errors");
					t.exports = {
						verify: function (e) {
							var t, r;
							return e ? (r = e.name, t = e.client, e = e.authorization, t || e ? e || "3.69.0" === t.getVersion() ? i.resolve() : i.reject(new n({
								type: o.INCOMPATIBLE_VERSIONS.type,
								code: o.INCOMPATIBLE_VERSIONS.code,
								message: "Client (version " + t.getVersion() + ") and " + r + " (version 3.69.0) components must be from the same SDK version."
							})) : i.reject(new n({
								type: o.INSTANTIATION_OPTION_REQUIRED.type,
								code: o.INSTANTIATION_OPTION_REQUIRED.code,
								message: "options.client is required when instantiating " + r + "."
							}))) : i.reject(new n({
								type: o.INVALID_USE_OF_INTERNAL_FUNCTION.type,
								code: o.INVALID_USE_OF_INTERNAL_FUNCTION.code,
								message: "Options must be passed to basicComponentVerification function."
							}))
						}
					}
				}, {"./braintree-error": 35, "./errors": 44, "./promise": 49}],
				35: [function (e, t, r) {
					"use strict";
					e = e("./enumerate");

					function n(e) {
						if (!n.types.hasOwnProperty(e.type)) throw new Error(e.type + " is not a valid type.");
						if (!e.code) throw new Error("Error code required.");
						if (!e.message) throw new Error("Error message required.");
						this.name = "BraintreeError", this.code = e.code, this.message = e.message, this.type = e.type, this.details = e.details
					}

					n.prototype = Object.create(Error.prototype), (n.prototype.constructor = n).types = e(["CUSTOMER", "MERCHANT", "NETWORK", "INTERNAL", "UNKNOWN"]), n.findRootError = function (e) {
						return e instanceof n && e.details && e.details.originalError ? n.findRootError(e.details.originalError) : e
					}, t.exports = n
				}, {"./enumerate": 43}],
				36: [function (e, t, r) {
					"use strict";
					t.exports = {
						ANALYTICS_PREFIX: "web.",
						ANALYTICS_REQUEST_TIMEOUT_MS: 2e3,
						ASSETS_URLS: {
							production: "https://assets.braintreegateway.com",
							sandbox: "https://assets.braintreegateway.com"
						},
						CLIENT_API_URLS: {
							production: "https://api.braintreegateway.com:443",
							sandbox: "https://api.sandbox.braintreegateway.com:443"
						},
						FRAUDNET_SOURCE: "BRAINTREE_SIGNIN",
						FRAUDNET_FNCLS: "fnparams-dede7cc5-15fd-4c75-a9f4-36c430ee3a99",
						FRAUDNET_URL: "https://c.paypal.com/da/r/fb.js",
						BUS_CONFIGURATION_REQUEST_EVENT: "BUS_CONFIGURATION_REQUEST",
						GRAPHQL_URLS: {
							production: "https://payments.braintree-api.com/graphql",
							sandbox: "https://payments.sandbox.braintree-api.com/graphql"
						},
						INTEGRATION_TIMEOUT_MS: 6e4,
						VERSION: "3.69.0",
						INTEGRATION: "custom",
						SOURCE: "client",
						PLATFORM: "web",
						BRAINTREE_LIBRARY_VERSION: "braintree/web/3.69.0"
					}
				}, {}],
				37: [function (e, t, r) {
					"use strict";
					var n = e("./braintree-error"), i = e("./errors");
					t.exports = function (t, e) {
						e.forEach(function (e) {
							t[e] = function () {
								throw new n({
									type: i.METHOD_CALLED_AFTER_TEARDOWN.type,
									code: i.METHOD_CALLED_AFTER_TEARDOWN.code,
									message: e + " cannot be called after teardown."
								})
							}
						})
					}
				}, {"./braintree-error": 35, "./errors": 44}],
				38: [function (e, t, r) {
					"use strict";
					var n = e("./braintree-error");
					t.exports = function (e, t) {
						return e instanceof n ? e : new n({
							type: t.type,
							code: t.code,
							message: t.message,
							details: {originalError: e}
						})
					}
				}, {"./braintree-error": 35}],
				39: [function (e, t, r) {
					"use strict";
					var n = e("./constants").ASSETS_URLS;
					t.exports = {
						create: function (e) {
							return n.production
						}
					}
				}, {"./constants": 36}],
				40: [function (e, t, r) {
					"use strict";
					var i = e("../lib/vendor/polyfill").atob, o = e("../lib/constants").CLIENT_API_URLS;
					t.exports = function (e) {
						var t, r, n = {attrs: {}, configUrl: ""};
						return /^[a-zA-Z0-9]+_[a-zA-Z0-9]+_[a-zA-Z0-9_]+$/.test(e) ? (t = (r = (t = e).split("_"))[0], t = {
							merchantId: r.slice(2).join("_"),
							environment: t
						}, n.environment = t.environment, n.attrs.tokenizationKey = e, n.configUrl = o[t.environment] + "/merchants/" + t.merchantId + "/client_api/v1/configuration") : (e = JSON.parse(i(e)), n.environment = e.environment, n.attrs.authorizationFingerprint = e.authorizationFingerprint, n.configUrl = e.configUrl, n.graphQL = e.graphQL), n
					}
				}, {"../lib/constants": 36, "../lib/vendor/polyfill": 51}],
				41: [function (e, t, r) {
					"use strict";
					var n = e("./braintree-error"), i = e("./promise"), o = e("./assets"), s = e("./errors"),
							a = "3.69.0";
					t.exports = {
						create: function (e) {
							var t = i.resolve();
							return e.client ? i.resolve(e.client) : (window.braintree && window.braintree.client || (t = o.loadScript({src: e.assetsUrl + "/web/" + a + "/js/client.min.js"}).catch(function (e) {
								return i.reject(new n({
									type: s.CLIENT_SCRIPT_FAILED_TO_LOAD.type,
									code: s.CLIENT_SCRIPT_FAILED_TO_LOAD.code,
									message: s.CLIENT_SCRIPT_FAILED_TO_LOAD.message,
									details: {originalError: e}
								}))
							})), t.then(function () {
								return window.braintree.client.VERSION !== a ? i.reject(new n({
									type: s.INCOMPATIBLE_VERSIONS.type,
									code: s.INCOMPATIBLE_VERSIONS.code,
									message: "Client (version " + window.braintree.client.VERSION + ") and " + e.name + " (version " + a + ") components must be from the same SDK version."
								})) : window.braintree.client.create({authorization: e.authorization, debug: e.debug})
							}))
						}
					}
				}, {"./assets": 32, "./braintree-error": 35, "./errors": 44, "./promise": 49}],
				42: [function (e, t, r) {
					"use strict";
					t.exports = function (t) {
						return function () {
							var e = arguments;
							setTimeout(function () {
								t.apply(null, e)
							}, 1)
						}
					}
				}, {}],
				43: [function (e, t, r) {
					"use strict";
					t.exports = function (e, r) {
						return r = null == r ? "" : r, e.reduce(function (e, t) {
							return e[t] = r + t, e
						}, {})
					}
				}, {}],
				44: [function (e, t, r) {
					"use strict";
					e = e("./braintree-error");
					t.exports = {
						INVALID_USE_OF_INTERNAL_FUNCTION: {
							type: e.types.INTERNAL,
							code: "INVALID_USE_OF_INTERNAL_FUNCTION"
						},
						INSTANTIATION_OPTION_REQUIRED: {type: e.types.MERCHANT, code: "INSTANTIATION_OPTION_REQUIRED"},
						INCOMPATIBLE_VERSIONS: {type: e.types.MERCHANT, code: "INCOMPATIBLE_VERSIONS"},
						CLIENT_SCRIPT_FAILED_TO_LOAD: {
							type: e.types.NETWORK,
							code: "CLIENT_SCRIPT_FAILED_TO_LOAD",
							message: "Braintree client script could not be loaded."
						},
						METHOD_CALLED_AFTER_TEARDOWN: {type: e.types.MERCHANT, code: "METHOD_CALLED_AFTER_TEARDOWN"}
					}
				}, {"./braintree-error": 35}],
				45: [function (e, t, r) {
					"use strict";
					t.exports = {
						isHTTPS: function (e) {
							return "https:" === (e = e || window.location.protocol)
						}
					}
				}, {}],
				46: [function (e, t, r) {
					"use strict";
					var n, i = {
						"paypal.com": 1,
						"braintreepayments.com": 1,
						"braintreegateway.com": 1,
						"braintree-api.com": 1
					};
					t.exports = function (e) {
						return e = e.toLowerCase(), !!/^https:/.test(e) && ((n = n || document.createElement("a")).href = e, e = n.hostname.split(".").slice(-2).join("."), i.hasOwnProperty(e))
					}
				}, {}],
				47: [function (e, t, r) {
					"use strict";
					t.exports = function (e) {
						return JSON.parse(JSON.stringify(e))
					}
				}, {}],
				48: [function (e, t, r) {
					"use strict";
					t.exports = function (t) {
						return Object.keys(t).filter(function (e) {
							return "function" == typeof t[e]
						})
					}
				}, {}],
				49: [function (e, t, r) {
					"use strict";
					var n = e("promise-polyfill"), e = e("@braintree/extended-promise"),
							n = "undefined" != typeof Promise ? Promise : n;
					e.suppressUnhandledPromiseMessage = !0, e.setPromise(n), t.exports = n
				}, {"@braintree/extended-promise": 5, "promise-polyfill": 29}],
				50: [function (e, t, r) {
					"use strict";
					t.exports = function (e) {
						return e ? "" : ".min"
					}
				}, {}],
				51: [function (e, t, r) {
					"use strict";
					var n = "function" == typeof atob ? window.atob : i;

					function i(e) {
						var t, r, n, i, o = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", s = "";
						if (!new RegExp("^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=|[A-Za-z0-9+/]{4})([=]{1,2})?$").test(e)) throw new Error("Non base64 encoded input passed to window.atob polyfill");
						for (i = 0; t = (63 & o.indexOf(e.charAt(i++))) << 2 | (r = o.indexOf(e.charAt(i++))) >> 4 & 3, r = (15 & r) << 4 | (n = o.indexOf(e.charAt(i++))) >> 2 & 15, n = (3 & n) << 6 | 63 & o.indexOf(e.charAt(i++)), s += String.fromCharCode(t) + (r ? String.fromCharCode(r) : "") + (n ? String.fromCharCode(n) : ""), i < e.length;) ;
						return s
					}

					t.exports = {
						atob: function (e) {
							return n.call(window, e)
						}, _atob: i
					}
				}, {}],
				52: [function (e, t, r) {
					"use strict";
					var n = e("../../../lib/assign").assign, o = e("../../../lib/analytics"),
							s = e("../../../lib/braintree-error"), a = e("../../../lib/promise"),
							c = e("../../../lib/is-verified-domain"), i = e("@braintree/extended-promise"),
							u = e("@braintree/event-emitter"), l = e("../../shared/errors"),
							d = e("@braintree/iframer"), p = e("framebus"), f = e("../../shared/constants"),
							_ = e("@braintree/uuid"), h = e("../../shared/events"), E = e("../../../lib/use-min"),
							m = e("../../../lib/constants").BUS_CONFIGURATION_REQUEST_EVENT;

					function y(e) {
						u.call(this), this._client = e.client, this._createPromise = e.createPromise, this._createOptions = e, this._client ? (this._isDebug = this._client.getConfiguration().isDebug, this._assetsUrl = this._client.getConfiguration().gatewayConfiguration.assetsUrl) : (this._isDebug = Boolean(e.isDebug), this._assetsUrl = e.assetsUrl), this._assetsUrl = this._assetsUrl + "/web/3.69.0"
					}

					u.createChild(y), y.prototype._waitForClient = function () {
						return this._client ? a.resolve() : this._createPromise.then(function (e) {
							this._client = e
						}.bind(this))
					}, y.prototype.setUpEventListeners = function () {
						throw new s(l.THREEDS_FRAMEWORK_METHOD_NOT_IMPLEMENTED)
					}, y.prototype.verifyCard = function (e, t) {
						var r, n = this;
						return t = t || {}, (t = this._checkForVerifyCardError(e, t)) ? a.reject(t) : (this._verifyCardInProgress = !0, r = this._formatVerifyCardOptions(e), this._formatLookupData(r).then(function (e) {
							return o.sendEvent(n._createPromise, "three-d-secure.verification-flow.started"), n._performLookup(r.nonce, e)
						}).then(function (e) {
							return o.sendEvent(n._createPromise, "three-d-secure.verification-flow.3ds-version." + e.lookup.threeDSecureVersion), n._onLookupComplete(e, r)
						}).then(function (e) {
							return n.initializeChallengeWithLookupResponse(e, r)
						}).then(function (e) {
							return n._resetVerificationState(), o.sendEvent(n._createPromise, "three-d-secure.verification-flow.completed"), e
						}).catch(function (e) {
							return n._resetVerificationState(), o.sendEvent(n._createPromise, "three-d-secure.verification-flow.failed"), a.reject(e)
						}))
					}, y.prototype._checkForFrameworkSpecificVerifyCardErrors = function () {
						throw new s(l.THREEDS_FRAMEWORK_METHOD_NOT_IMPLEMENTED)
					}, y.prototype._presentChallenge = function () {
						throw new s(l.THREEDS_FRAMEWORK_METHOD_NOT_IMPLEMENTED)
					}, y.prototype.prepareLookup = function () {
						throw new s(l.THREEDS_FRAMEWORK_METHOD_NOT_IMPLEMENTED)
					}, y.prototype._resetVerificationState = function () {
						this._verifyCardInProgress = !1, this._verifyCardPromisePlus = null
					}, y.prototype._performLookup = function (e, t) {
						var i = this, r = "payment_methods/" + e + "/three_d_secure/lookup";
						return this._waitForClient().then(function () {
							return i._client.request({endpoint: r, method: "post", data: t}).catch(function (e) {
								var t, r = e && e.details && e.details.httpStatus,
										n = "three-d-secure.verification-flow.lookup-failed";
								return 404 === r ? (t = l.THREEDS_LOOKUP_TOKENIZED_CARD_NOT_FOUND_ERROR, n += ".404") : 422 === r ? (t = l.THREEDS_LOOKUP_VALIDATION_ERROR, n += ".422") : t = l.THREEDS_LOOKUP_ERROR, o.sendEvent(i._createPromise, n), a.reject(new s({
									type: t.type,
									code: t.code,
									message: t.message,
									details: {originalError: e}
								}))
							})
						})
					}, y.prototype._checkForVerifyCardError = function (e, t) {
						var r;
						return !0 === this._verifyCardInProgress ? new s(l.THREEDS_AUTHENTICATION_IN_PROGRESS) : (e.nonce ? e.amount || (r = "an amount") : r = "a nonce", (r = r || this._checkForFrameworkSpecificVerifyCardErrors(e, t)) ? new s({
							type: l.THREEDS_MISSING_VERIFY_CARD_OPTION.type,
							code: l.THREEDS_MISSING_VERIFY_CARD_OPTION.code,
							message: "verifyCard options must include " + r + "."
						}) : null)
					}, y.prototype.initializeChallengeWithLookupResponse = function (e, t) {
						var r = this;
						return t = t || {}, this._lookupPaymentMethod = e.paymentMethod, r._verifyCardPromisePlus = r._verifyCardPromisePlus || new i, r._handleLookupResponse(e, t), r._verifyCardPromisePlus.then(function (e) {
							return o.sendEvent(r._createPromise, "three-d-secure.verification-flow.liability-shifted." + String(e.liabilityShifted)), o.sendEvent(r._createPromise, "three-d-secure.verification-flow.liability-shift-possible." + String(e.liabilityShiftPossible)), e
						})
					}, y.prototype._handleLookupResponse = function (e, t) {
						var r = Boolean(e.lookup && e.lookup.acsUrl);
						o.sendEvent(this._createPromise, "three-d-secure.verification-flow.challenge-presented." + String(r)), r ? this._presentChallenge(e, t) : ((t = this._formatAuthResponse(e.paymentMethod, e.threeDSecureInfo)).verificationDetails = e.threeDSecureInfo, this._verifyCardPromisePlus.resolve(t))
					}, y.prototype._onLookupComplete = function (e) {
						return this._lookupPaymentMethod = e.paymentMethod, this._verifyCardPromisePlus = new i, a.resolve(e)
					}, y.prototype._formatAuthResponse = function (e, t) {
						return {
							nonce: e.nonce,
							binData: e.binData,
							details: e.details,
							description: e.description && e.description.replace(/\+/g, " "),
							liabilityShifted: t && t.liabilityShifted,
							liabilityShiftPossible: t && t.liabilityShiftPossible,
							threeDSecureInfo: e.threeDSecureInfo
						}
					}, y.prototype._formatVerifyCardOptions = function (e) {
						return n({}, e)
					}, y.prototype._formatLookupData = function (e) {
						e = {amount: e.amount};
						return a.resolve(e)
					}, y.prototype._handleV1AuthResponse = function (e) {
						e = JSON.parse(e.auth_response);
						e.success ? this._verifyCardPromisePlus.resolve(this._formatAuthResponse(e.paymentMethod, e.threeDSecureInfo)) : e.threeDSecureInfo && e.threeDSecureInfo.liabilityShiftPossible ? this._verifyCardPromisePlus.resolve(this._formatAuthResponse(this._lookupPaymentMethod, e.threeDSecureInfo)) : this._verifyCardPromisePlus.reject(new s({
							type: s.types.UNKNOWN,
							code: "UNKNOWN_AUTH_RESPONSE",
							message: e.error.message
						}))
					}, y.prototype.cancelVerifyCard = function () {
						var e;
						return this._verifyCardInProgress = !1, this._lookupPaymentMethod ? (e = this._lookupPaymentMethod.threeDSecureInfo, e = n({}, this._lookupPaymentMethod, {
							liabilityShiftPossible: e && e.liabilityShiftPossible,
							liabilityShifted: e && e.liabilityShifted,
							verificationDetails: e && e.verificationDetails
						}), a.resolve(e)) : a.reject(new s(l.THREEDS_NO_VERIFICATION_PAYLOAD))
					}, y.prototype._setupV1Bus = function (e) {
						var t = window.location.href.split("#")[0], r = e.lookupResponse, n = _(),
								i = new p({channel: n, verifyDomain: c}),
								o = this._assetsUrl + "/html/three-d-secure-authentication-complete-frame.html?channel=" + encodeURIComponent(n) + "&";
						return i.on(m, function (e) {
							e({
								acsUrl: r.acsUrl,
								pareq: r.pareq,
								termUrl: r.termUrl + "&three_d_secure_version=3.69.0&authentication_complete_base_url=" + encodeURIComponent(o),
								md: r.md,
								parentUrl: t
							})
						}), i.on(h.AUTHENTICATION_COMPLETE, e.handleAuthResponse), i
					}, y.prototype._setupV1Iframe = function (e) {
						e = this._assetsUrl + "/html/three-d-secure-bank-frame" + E(this._isDebug) + ".html?showLoader=" + e.showLoader;
						return d({
							src: e,
							height: 400,
							width: 400,
							name: f.LANDING_FRAME_NAME + "_" + this._v1Bus.channel,
							title: "3D Secure Authorization Frame"
						})
					}, y.prototype._setupV1Elements = function (e) {
						this._v1Bus = this._setupV1Bus(e), this._v1Iframe = this._setupV1Iframe(e)
					}, y.prototype._teardownV1Elements = function () {
						this._v1Bus && (this._v1Bus.teardown(), this._v1Bus = null), this._v1Iframe && this._v1Iframe.parentNode && (this._v1Iframe.parentNode.removeChild(this._v1Iframe), this._v1Iframe = null), this._onV1Keyup && (document.removeEventListener("keyup", this._onV1Keyup), this._onV1Keyup = null)
					}, y.prototype.teardown = function () {
						return o.sendEvent(this._createPromise, "three-d-secure.teardown-completed"), this._teardownV1Elements(), a.resolve()
					}, t.exports = y
				}, {
					"../../../lib/analytics": 31,
					"../../../lib/assign": 33,
					"../../../lib/braintree-error": 35,
					"../../../lib/constants": 36,
					"../../../lib/is-verified-domain": 46,
					"../../../lib/promise": 49,
					"../../../lib/use-min": 50,
					"../../shared/constants": 61,
					"../../shared/errors": 62,
					"../../shared/events": 63,
					"@braintree/event-emitter": 4,
					"@braintree/extended-promise": 5,
					"@braintree/iframer": 6,
					"@braintree/uuid": 10,
					framebus: 16
				}],
				53: [function (e, t, r) {
					"use strict";
					var n = e("./songbird");

					function i(e) {
						n.call(this, e)
					}

					(i.prototype = Object.create(n.prototype, {constructor: n}))._createV1IframeModalElement = function (e) {
						var t = document.createElement("div");
						return t.innerHTML = '<div class="modal fade in" tabindex="-1" role="dialog" aria-labelledby="CCAFrameModal-label" aria-hidden="true" style="display: block;"><div class="modal-dialog" style="width:440px;z-index:999999;"><div class="modal-content"><div class="modal-body" data-braintree-v1-fallback-iframe-container><button type="button" data-braintree-v1-fallback-close-button class="close" data-dismiss="modal" aria-hidden="true">Ã—</button></div></div></div><div data-braintree-v1-fallback-backdrop style="position: fixed;cursor: pointer;z-index: 999998;top: 0;left: 0;width: 100%;height: 100%;"></div></div>', t.querySelector("[data-braintree-v1-fallback-iframe-container]").appendChild(e), t
					}, i.prototype._createCardinalConfigurationOptions = function (e) {
						e = n.prototype._createCardinalConfigurationOptions.call(this, e);
						return e.payment.framework = "bootstrap3", e
					}, t.exports = i
				}, {"./songbird": 58}],
				54: [function (e, t, r) {
					"use strict";
					var n = e("./songbird");

					function i(e) {
						n.call(this, e)
					}

					(i.prototype = Object.create(n.prototype, {constructor: n}))._createV1IframeModalElement = function (e) {
						var t = document.createElement("div"),
								r = Boolean(this._createOptions && this._createOptions.cardinalSDKConfig && this._createOptions.cardinalSDKConfig.payment && this._createOptions.cardinalSDKConfig.payment.displayExitButton);
						return t.innerHTML = '<div style="position: fixed;z-index: 999999;top: 50%;left: 50%;padding: 24px 20px;transform: translate(-50%,-50%);border-radius: 2px;background: #fff;max-width: 100%;overflow: auto;"><div><button data-braintree-v1-fallback-close-button style="font-family: Helvetica,Arial,sans-serif;font-size: 25px;line-height: 12px;position: absolute;top: 2px;right: 0px;cursor: pointer;color: #999;border: 0;outline: none;background: none;" onMouseOver="this.style.color=\'#000\'" onMouseOut="this.style.color=\'#999\'">Ã—</button></div><div data-braintree-v1-fallback-iframe-container style="height: 400px;"></div></div><div data-braintree-v1-fallback-backdrop style="position: fixed;z-index: 999998;cursor: pointer;top: 0;left: 0;width: 100%;height: 100%;transition: opacity 1ms ease;background: rgba(0,0,0,.6);"></div>', r || (t.querySelector("[data-braintree-v1-fallback-close-button]").style.display = "none"), t.querySelector("[data-braintree-v1-fallback-iframe-container]").appendChild(e), t
					}, t.exports = i
				}, {"./songbird": 58}],
				55: [function (e, t, r) {
					"use strict";
					var n = e("./legacy"), i = e("./cardinal-modal"), o = e("./bootstrap3-modal"),
							e = e("./inline-iframe");
					t.exports = {legacy: n, "cardinal-modal": i, "bootstrap3-modal": o, "inline-iframe": e}
				}, {"./bootstrap3-modal": 53, "./cardinal-modal": 54, "./inline-iframe": 56, "./legacy": 57}],
				56: [function (e, t, r) {
					"use strict";
					var n = e("./songbird"), o = e("../../../lib/braintree-error"), s = e("../../shared/errors"),
							e = e("../../../lib/enumerate");

					function a(e) {
						n.call(this, e)
					}

					a.prototype = Object.create(n.prototype, {constructor: n}), a.events = e(["AUTHENTICATION_IFRAME_AVAILABLE"], "inline-iframe-framework:"), a.prototype.setUpEventListeners = function (r) {
						n.prototype.setUpEventListeners.call(this, r), this.on(a.events.AUTHENTICATION_IFRAME_AVAILABLE, function (e, t) {
							r("authentication-iframe-available", e, t)
						})
					}, a.prototype._createCardinalConfigurationOptions = function (e) {
						e = n.prototype._createCardinalConfigurationOptions.call(this, e);
						return e.payment.framework = "inline", e
					}, a.prototype._addV1IframeToPage = function () {
						this._emit(a.events.AUTHENTICATION_IFRAME_AVAILABLE, {element: this._v1Modal}, function () {
						})
					}, a.prototype._setupFrameworkSpecificListeners = function () {
						this.setCardinalListener("ui.inline.setup", this._onInlineSetup.bind(this))
					}, a.prototype._onInlineSetup = function (e, t, r, n) {
						var i;
						e && t && "CCA" === t.paymentType && ("suppress" === t.data.mode || "static" === t.data.mode) || (i = !0), i ? n(new o(s.THREEDS_INLINE_IFRAME_DETAILS_INCORRECT)) : ((n = document.createElement("div")).innerHTML = e, "suppress" === t.data.mode ? (n.style.display = "none", document.body.appendChild(n), r()) : "static" === t.data.mode && this._emit(a.events.AUTHENTICATION_IFRAME_AVAILABLE, {element: n}, function () {
							r()
						}))
					}, t.exports = a
				}, {
					"../../../lib/braintree-error": 35,
					"../../../lib/enumerate": 43,
					"../../shared/errors": 62,
					"./songbird": 58
				}],
				57: [function (e, t, r) {
					"use strict";
					var n = e("./base"), i = e("../../../lib/deferred");

					function o(e) {
						n.call(this, e)
					}

					(o.prototype = Object.create(n.prototype, {constructor: o})).setUpEventListeners = function () {
					}, o.prototype.transformV1CustomerBillingAddress = function (e) {
						return e.billingAddress.line1 = e.billingAddress.streetAddress, e.billingAddress.line2 = e.billingAddress.extendedAddress, e.billingAddress.city = e.billingAddress.locality, e.billingAddress.state = e.billingAddress.region, e.billingAddress.countryCode = e.billingAddress.countryCodeAlpha2, delete e.billingAddress.streetAddress, delete e.billingAddress.extendedAddress, delete e.billingAddress.locality, delete e.billingAddress.region, delete e.billingAddress.countryCodeAlpha2, e
					}, o.prototype._createIframe = function (t) {
						var r = this;
						return this._setupV1Elements({
							lookupResponse: t.lookupResponse,
							showLoader: t.showLoader,
							handleAuthResponse: function (e) {
								r._handleAuthResponse(e, t)
							}
						}), this._v1Iframe
					}, o.prototype._handleAuthResponse = function (e, t) {
						this._v1Bus.teardown(), t.removeFrame(), i(function () {
							this._handleV1AuthResponse(e)
						}.bind(this))()
					}, o.prototype._checkForFrameworkSpecificVerifyCardErrors = function (e) {
						var t;
						return "function" != typeof e.addFrame ? t = "an addFrame function" : "function" != typeof e.removeFrame && (t = "a removeFrame function"), t
					}, o.prototype._formatVerifyCardOptions = function (e) {
						var t = n.prototype._formatVerifyCardOptions.call(this, e);
						return t.addFrame = i(e.addFrame), t.removeFrame = i(e.removeFrame), t.showLoader = !1 !== e.showLoader, t
					}, o.prototype._formatLookupData = function (t) {
						var r = this;
						return n.prototype._formatLookupData.call(this, t).then(function (e) {
							return t.customer && t.customer.billingAddress && (e.customer = r.transformV1CustomerBillingAddress(t.customer)), e
						})
					}, o.prototype._presentChallenge = function (e, t) {
						t.addFrame(null, this._createIframe({
							showLoader: t.showLoader,
							lookupResponse: e.lookup,
							removeFrame: t.removeFrame
						}))
					}, t.exports = o
				}, {"../../../lib/deferred": 42, "./base": 52}],
				58: [function (e, t, r) {
					"use strict";
					var n = e("./base"), i = e("../../../lib/assign").assign, o = e("../../../lib/deferred"),
							s = e("../../../lib/braintree-error"), a = e("../../../lib/convert-to-braintree-error"),
							c = e("../../../lib/analytics"), u = e("../../../lib/assets"), l = e("../../shared/errors"),
							d = e("../../../lib/enumerate"), p = e("../../shared/constants"),
							f = e("../../../lib/promise"), _ = e("@braintree/extended-promise"),
							h = e("../../../lib/constants").INTEGRATION_TIMEOUT_MS,
							E = e("../../../lib/constants").PLATFORM,
							m = ["ui.close", "ui.render", "ui.renderHidden", "ui.loading.close", "ui.loading.render"];

					function y(e) {
						n.call(this, e), this._useV1Fallback = !1, this._clientMetadata = {
							requestedThreeDSecureVersion: "2",
							sdkVersion: E + "/3.69.0"
						}, this._getDfReferenceIdPromisePlus = new _, this.setupSongbird(e), this._cardinalEvents = []
					}

					function b(e, t, r) {
						t[r + "Line1"] = e.streetAddress, t[r + "Line2"] = e.extendedAddress, t[r + "Line3"] = e.line3, t[r + "City"] = e.locality, t[r + "State"] = e.region, t[r + "PostalCode"] = e.postalCode, t[r + "CountryCode"] = e.countryCodeAlpha2
					}

					y.prototype = Object.create(n.prototype, {constructor: y}), y.events = d(["LOOKUP_COMPLETE", "CUSTOMER_CANCELED", "UI.CLOSE", "UI.RENDER", "UI.RENDERHIDDEN", "UI.LOADING.CLOSE", "UI.LOADING.RENDER"], "songbird-framework:"), y.prototype.setUpEventListeners = function (r) {
						this.on(y.events.LOOKUP_COMPLETE, function (e, t) {
							r("lookup-complete", e, t)
						}), this.on(y.events.CUSTOMER_CANCELED, function () {
							r("customer-canceled")
						}), this.on(y.events["UI.CLOSE"], function () {
							r("authentication-modal-close")
						}), this.on(y.events["UI.RENDER"], function () {
							r("authentication-modal-render")
						}), this.on(y.events["UI.RENDERHIDDEN"], function () {
							r("authentication-modal-render-hidden")
						}), this.on(y.events["UI.LOADING.CLOSE"], function () {
							r("authentication-modal-loader-close")
						}), this.on(y.events["UI.LOADING.RENDER"], function () {
							r("authentication-modal-loader-render")
						})
					}, y.prototype.prepareLookup = function (e) {
						var t = i({}, e), r = this;
						return this.getDfReferenceId().then(function (e) {
							t.dfReferenceId = e
						}).then(function () {
							return r._triggerCardinalBinProcess(e.bin)
						}).catch(function () {
						}).then(function () {
							return r._waitForClient()
						}).then(function () {
							return t.clientMetadata = r._clientMetadata, t.authorizationFingerprint = r._client.getConfiguration().authorizationFingerprint, t.braintreeLibraryVersion = "braintree/web/3.69.0", t
						})
					}, y.prototype.initializeChallengeWithLookupResponse = function (e, t) {
						return this.setupSongbird().then(function () {
							return n.prototype.initializeChallengeWithLookupResponse.call(this, e, t)
						}.bind(this))
					}, y.prototype._initiateV1Fallback = function (e) {
						this._useV1Fallback = !0, c.sendEvent(this._createPromise, "three-d-secure.v1-fallback." + e), this._songbirdPromise.resolve()
					}, y.prototype._triggerCardinalBinProcess = function (e) {
						var t = this, r = Date.now();
						return e ? window.Cardinal.trigger("bin.process", e).then(function (e) {
							t._clientMetadata.issuerDeviceDataCollectionTimeElapsed = Date.now() - r, t._clientMetadata.issuerDeviceDataCollectionResult = e && e.Status
						}) : f.resolve()
					}, y.prototype.transformBillingAddress = function (e, t) {
						return t && (b(t, e, "billing"), e.billingPhoneNumber = t.phoneNumber, e.billingGivenName = t.givenName, e.billingSurname = t.surname), e
					}, y.prototype.transformShippingAddress = function (e) {
						var t = e.shippingAddress;
						return t && (b(t, e, "shipping"), delete e.shippingAddress), e
					}, y.prototype._createV1IframeModalElement = function (e) {
						var t = document.createElement("div");
						return t.innerHTML = '<div data-braintree-v1-fallback-iframe-container="true" style="height: 400px;"></div>', t.querySelector('[data-braintree-v1-fallback-iframe-container="true"]').appendChild(e), t
					}, y.prototype._createV1IframeModal = function (e) {
						var t = this._createV1IframeModalElement(e),
								r = t.querySelector("[data-braintree-v1-fallback-close-button]"),
								e = t.querySelector("[data-braintree-v1-fallback-backdrop]"), n = this;

						function i() {
							t.parentNode.removeChild(t), n.cancelVerifyCard(l.THREEDS_CARDINAL_SDK_CANCELED), document.removeEventListener("keyup", n._onV1Keyup), n._onV1Keyup = null
						}

						return this._onV1Keyup = function (e) {
							"Escape" === e.key && t.parentNode && i()
						}, r && r.addEventListener("click", i), e && e.addEventListener("click", i), document.addEventListener("keyup", this._onV1Keyup), t
					}, y.prototype._addV1IframeToPage = function () {
						document.body.appendChild(this._v1Modal)
					}, y.prototype._handleAuthResponseFromV1Fallback = function (e) {
						this._teardownV1Elements(), this._v1Modal.parentNode.removeChild(this._v1Modal), this._handleV1AuthResponse(e)
					}, y.prototype._presentChallengeWithV1Fallback = function (e) {
						var t = this;
						this._setupV1Elements({
							lookupResponse: e, showLoader: !0, handleAuthResponse: function (e) {
								t._handleAuthResponseFromV1Fallback(e)
							}
						}), this._v1Modal = this._createV1IframeModal(this._v1Iframe), this._addV1IframeToPage()
					}, y.prototype.setupSongbird = function (e) {
						var t = this, r = Date.now();
						return this._songbirdPromise || (e = e || {}, this._songbirdPromise = new _, this._v2SetupFailureReason = "reason-unknown", t._loadCardinalScript(e).then(function () {
							return window.Cardinal ? t._configureCardinalSdk({
								setupOptions: e,
								setupStartTime: r
							}) : (t._v2SetupFailureReason = "cardinal-global-unavailable", f.reject(new s(l.THREEDS_CARDINAL_SDK_SETUP_FAILED)))
						}).catch(function (e) {
							e = a(e, {
								type: l.THREEDS_CARDINAL_SDK_SETUP_FAILED.type,
								code: l.THREEDS_CARDINAL_SDK_SETUP_FAILED.code,
								message: l.THREEDS_CARDINAL_SDK_SETUP_FAILED.message
							});
							t._getDfReferenceIdPromisePlus.reject(e), window.clearTimeout(t._songbirdSetupTimeoutReference), c.sendEvent(t._client, "three-d-secure.cardinal-sdk.init.setup-failed"), t._initiateV1Fallback("cardinal-sdk-setup-failed." + t._v2SetupFailureReason)
						}), this._songbirdPromise)
					}, y.prototype._configureCardinalSdk = function (n) {
						var i = this;
						return this._waitForClient().then(function () {
							var e = i._client.getConfiguration().gatewayConfiguration.threeDSecure.cardinalAuthenticationJWT,
									t = n.setupOptions, r = n.setupStartTime,
									t = i._createCardinalConfigurationOptions(t);
							m.forEach(function (e) {
								i.setCardinalListener(e, function () {
									i._emit(y.events[e.toUpperCase()])
								})
							}), i.setCardinalListener("payments.setupComplete", i._createPaymentsSetupCompleteCallback()), i._setupFrameworkSpecificListeners(), window.Cardinal.configure(t), window.Cardinal.setup("init", {jwt: e}), i._clientMetadata.cardinalDeviceDataCollectionTimeElapsed = Date.now() - r, i.setCardinalListener("payments.validated", i._createPaymentsValidatedCallback())
						}).catch(function (e) {
							return i._v2SetupFailureReason = "cardinal-configuration-threw-error", f.reject(e)
						})
					}, y.prototype.setCardinalListener = function (e, t) {
						this._cardinalEvents.push(e), window.Cardinal.on(e, t)
					}, y.prototype._setupFrameworkSpecificListeners = function () {
					}, y.prototype._createCardinalConfigurationOptions = function (e) {
						var t = e.cardinalSDKConfig || {}, r = t.payment || {};
						return !t.logging && e.loggingEnabled && (t.logging = {level: "verbose"}), t.payment = {}, r.hasOwnProperty("displayLoading") && (t.payment.displayLoading = r.displayLoading), r.hasOwnProperty("displayExitButton") && (t.payment.displayExitButton = r.displayExitButton), t
					}, y.prototype._loadCardinalScript = function (t) {
						var r = this, n = p.CARDINAL_SCRIPT_SOURCE.sandbox;
						return this._waitForClient().then(function () {
							var e = "production" === r._client.getConfiguration().gatewayConfiguration.environment;
							return r._songbirdSetupTimeoutReference = window.setTimeout(function () {
								c.sendEvent(r._client, "three-d-secure.cardinal-sdk.init.setup-timeout"), r._initiateV1Fallback("cardinal-sdk-setup-timeout")
							}, t.timeout || h), e && (n = p.CARDINAL_SCRIPT_SOURCE.production), u.loadScript({src: n})
						}).catch(function (e) {
							return r._v2SetupFailureReason = "songbird-js-failed-to-load", f.reject(a(e, l.THREEDS_CARDINAL_SDK_SCRIPT_LOAD_FAILED))
						})
					}, y.prototype._createPaymentsSetupCompleteCallback = function () {
						var t = this;
						return function (e) {
							t._getDfReferenceIdPromisePlus.resolve(e.sessionId), window.clearTimeout(t._songbirdSetupTimeoutReference), c.sendEvent(t._createPromise, "three-d-secure.cardinal-sdk.init.setup-completed"), t._songbirdPromise.resolve()
						}
					}, y.prototype.getDfReferenceId = function () {
						return this._getDfReferenceIdPromisePlus
					}, y.prototype._performJWTValidation = function (r, e) {
						var n = this, t = this._lookupPaymentMethod.nonce,
								i = "payment_methods/" + t + "/three_d_secure/authenticate_from_jwt",
								o = r && r.Payment && r.Payment.ExtendedData && r.Payment.ExtendedData.ChallengeCancel;
						return o && (c.sendEvent(this._createPromise, "three-d-secure.verification-flow.cardinal-sdk.cancel-code." + o), "01" === o && this._emit(y.events.CUSTOMER_CANCELED)), c.sendEvent(this._createPromise, "three-d-secure.verification-flow.upgrade-payment-method.started"), this._waitForClient().then(function () {
							return n._client.request({
								method: "post",
								endpoint: i,
								data: {jwt: e, paymentMethodNonce: t}
							})
						}).then(function (e) {
							var t = e.paymentMethod || n._lookupPaymentMethod,
									e = n._formatAuthResponse(t, e.threeDSecureInfo);
							return e.rawCardinalSDKVerificationData = r, c.sendEvent(n._client, "three-d-secure.verification-flow.upgrade-payment-method.succeeded"), f.resolve(e)
						}).catch(function (e) {
							e = new s({
								type: l.THREEDS_JWT_AUTHENTICATION_FAILED.type,
								code: l.THREEDS_JWT_AUTHENTICATION_FAILED.code,
								message: l.THREEDS_JWT_AUTHENTICATION_FAILED.message,
								details: {originalError: e}
							});
							return c.sendEvent(n._client, "three-d-secure.verification-flow.upgrade-payment-method.errored"), f.reject(e)
						})
					}, y.prototype._createPaymentsValidatedCallback = function () {
						var n = this;
						return function (e, t) {
							var r;
							if (c.sendEvent(n._createPromise, "three-d-secure.verification-flow.cardinal-sdk.action-code." + e.ActionCode.toLowerCase()), n._verifyCardPromisePlus) switch (e.ActionCode) {
								case"SUCCESS":
								case"NOACTION":
								case"FAILURE":
									n._performJWTValidation(e, t).then(function (e) {
										n._verifyCardPromisePlus.resolve(e)
									}).catch(function (e) {
										n._verifyCardPromisePlus.reject(e)
									});
									break;
								case"ERROR":
									switch (c.sendEvent(n._createPromise, "three-d-secure.verification-flow.cardinal-sdk-error." + e.ErrorNumber), e.ErrorNumber) {
										case 10001:
										case 10002:
											r = new s(l.THREEDS_CARDINAL_SDK_SETUP_TIMEDOUT);
											break;
										case 10003:
										case 10007:
										case 10009:
											r = new s(l.THREEDS_CARDINAL_SDK_RESPONSE_TIMEDOUT);
											break;
										case 10005:
										case 10006:
											r = new s(l.THREEDS_CARDINAL_SDK_BAD_CONFIG);
											break;
										case 10008:
										case 10010:
											r = new s(l.THREEDS_CARDINAL_SDK_BAD_JWT);
											break;
										case 10011:
											c.sendEvent(n._createPromise, "three-d-secure.verification-flow.canceled"), r = new s(l.THREEDS_CARDINAL_SDK_CANCELED);
											break;
										default:
											r = new s(l.THREEDS_CARDINAL_SDK_ERROR)
									}
									r.details = {
										originalError: {
											code: e.ErrorNumber,
											description: e.ErrorDescription
										}
									}, n._verifyCardPromisePlus.reject(r)
							} else n._initiateV1Fallback("cardinal-sdk-setup-error.number-" + e.ErrorNumber)
						}
					}, y.prototype._checkForVerifyCardError = function (e, t) {
						return n.prototype._checkForVerifyCardError.call(this, e, t)
					}, y.prototype._checkForFrameworkSpecificVerifyCardErrors = function (e, t) {
						var r;
						return "function" == typeof e.onLookupComplete || t.ignoreOnLookupCompleteRequirement || (r = "an onLookupComplete function"), r
					}, y.prototype._formatVerifyCardOptions = function (e) {
						var t = n.prototype._formatVerifyCardOptions.call(this, e), r = t.additionalInformation || {},
								r = this.transformBillingAddress(r, e.billingAddress);
						return r = this.transformShippingAddress(r), e.onLookupComplete && (t.onLookupComplete = o(e.onLookupComplete)), e.email && (r.email = e.email), e.mobilePhoneNumber && (r.mobilePhoneNumber = e.mobilePhoneNumber), t.additionalInformation = r, t
					}, y.prototype._onLookupComplete = function (e, i) {
						var o = this;
						return n.prototype._onLookupComplete.call(this, e).then(function (n) {
							return new f(function (e, t) {
								function r() {
									e(n)
								}

								n.requiresUserAuthentication = Boolean(n.lookup && n.lookup.acsUrl), o._verifyCardPromisePlus.catch(t), i.onLookupComplete ? i.onLookupComplete(n, r) : o._emit(y.events.LOOKUP_COMPLETE, n, r)
							})
						})
					}, y.prototype._presentChallenge = function (e) {
						this._useV1Fallback ? this._presentChallengeWithV1Fallback(e.lookup) : window.Cardinal.continue("cca", {
							AcsUrl: e.lookup.acsUrl,
							Payload: e.lookup.pareq
						}, {OrderDetails: {TransactionId: e.lookup.transactionId}})
					}, y.prototype._formatLookupData = function (t) {
						var r = this;
						return n.prototype._formatLookupData.call(this, t).then(function (e) {
							return e.additionalInfo = t.additionalInformation, t.challengeRequested && (e.challengeRequested = t.challengeRequested), t.exemptionRequested && (e.exemptionRequested = t.exemptionRequested), t.bin && (e.bin = t.bin), r.prepareLookup(e)
						})
					}, y.prototype.cancelVerifyCard = function (t) {
						var r = this;
						return n.prototype.cancelVerifyCard.call(this).then(function (e) {
							return r._verifyCardPromisePlus && (t = t || new s(l.THREEDS_VERIFY_CARD_CANCELED_BY_MERCHANT), r._verifyCardPromisePlus.reject(t)), e
						})
					}, y.prototype.teardown = function () {
						return window.Cardinal && this._cardinalEvents.forEach(function (e) {
							window.Cardinal.off(e)
						}), n.prototype.teardown.call(this)
					}, t.exports = y
				}, {
					"../../../lib/analytics": 31,
					"../../../lib/assets": 32,
					"../../../lib/assign": 33,
					"../../../lib/braintree-error": 35,
					"../../../lib/constants": 36,
					"../../../lib/convert-to-braintree-error": 38,
					"../../../lib/deferred": 42,
					"../../../lib/enumerate": 43,
					"../../../lib/promise": 49,
					"../../shared/constants": 61,
					"../../shared/errors": 62,
					"./base": 52,
					"@braintree/extended-promise": 5
				}],
				59: [function (e, t, r) {
					"use strict";
					var n = e("@braintree/wrap-promise"), i = e("../../lib/methods"),
							o = e("../../lib/convert-methods-to-error"), s = e("@braintree/event-emitter"),
							a = e("./frameworks");

					function c(e) {
						var t = this, r = a[e.framework];
						s.call(this), this._framework = new r(e), this._framework.setUpEventListeners(function () {
							t._emit.apply(t, arguments)
						})
					}

					s.createChild(c), c.prototype.verifyCard = function (e) {
						var t;
						return this.hasListener("lookup-complete") && (t = {ignoreOnLookupCompleteRequirement: !0}), this._framework.verifyCard(e, t)
					}, c.prototype.initializeChallengeWithLookupResponse = function (e) {
						return "string" == typeof e && (e = JSON.parse(e)), this._framework.initializeChallengeWithLookupResponse(e)
					}, c.prototype.prepareLookup = function (e) {
						return this._framework.prepareLookup(e).then(function (e) {
							return JSON.stringify(e)
						})
					}, c.prototype.cancelVerifyCard = function () {
						return this._framework.cancelVerifyCard()
					}, c.prototype.teardown = function () {
						var e = i(c.prototype).concat(i(s.prototype));
						return o(this, e), this._framework.teardown()
					}, t.exports = n.wrapPrototype(c)
				}, {
					"../../lib/convert-methods-to-error": 37,
					"../../lib/methods": 48,
					"./frameworks": 55,
					"@braintree/event-emitter": 4,
					"@braintree/wrap-promise": 14
				}],
				60: [function (e, t, r) {
					"use strict";
					var s = e("./external/three-d-secure"), a = e("../lib/is-https").isHTTPS,
							i = e("../lib/basic-component-verification"), c = e("../lib/create-deferred-client"),
							u = e("../lib/create-assets-url"), l = e("../lib/braintree-error"),
							d = e("../lib/analytics"), p = e("./shared/errors"), f = e("../lib/promise"),
							e = e("@braintree/wrap-promise");
					t.exports = {
						create: e(function (o) {
							var n = "3D Secure";
							return i.verify({
								name: n,
								client: o.client,
								authorization: o.authorization
							}).then(function () {
								var e = u.create(o.authorization), i = function (e) {
									var t = String(e.version || "");
									if (!t || "1" === t) return "legacy";
									switch (t) {
										case"2":
										case"2-cardinal-modal":
											return "cardinal-modal";
										case"2-bootstrap3-modal":
											return "bootstrap3-modal";
										case"2-inline-iframe":
											return "inline-iframe";
										default:
											throw new l({
												code: p.THREEDS_UNRECOGNIZED_VERSION.code,
												type: p.THREEDS_UNRECOGNIZED_VERSION.type,
												message: "Version `" + e.version + "` is not a recognized version. You may need to update the version of your Braintree SDK to support this version."
											})
									}
								}(o), t = c.create({
									authorization: o.authorization,
									client: o.client,
									debug: o.debug,
									assetsUrl: e,
									name: n
								}).then(function (e) {
									var t, r = e.getConfiguration(), n = r.gatewayConfiguration;
									return o.client = e, n.threeDSecureEnabled || (t = p.THREEDS_NOT_ENABLED), "TOKENIZATION_KEY" === r.authorizationType && (t = p.THREEDS_CAN_NOT_USE_TOKENIZATION_KEY), "production" === n.environment && !a() && (t = p.THREEDS_HTTPS_REQUIRED), "legacy" === i || n.threeDSecure && n.threeDSecure.cardinalAuthenticationJWT || (d.sendEvent(o.client, "three-d-secure.initialization.failed.missing-cardinalAuthenticationJWT"), t = p.THREEDS_NOT_ENABLED_FOR_V2), t ? f.reject(new l(t)) : (d.sendEvent(o.client, "three-d-secure.initialized"), e)
								}), r = new s({
									client: o.client,
									assetsUrl: e,
									createPromise: t,
									loggingEnabled: o.loggingEnabled,
									cardinalSDKConfig: o.cardinalSDKConfig,
									framework: i
								});
								return o.client ? t.then(function () {
									return r
								}) : r
							})
						}), VERSION: "3.69.0"
					}
				}, {
					"../lib/analytics": 31,
					"../lib/basic-component-verification": 34,
					"../lib/braintree-error": 35,
					"../lib/create-assets-url": 39,
					"../lib/create-deferred-client": 41,
					"../lib/is-https": 45,
					"../lib/promise": 49,
					"./external/three-d-secure": 59,
					"./shared/errors": 62,
					"@braintree/wrap-promise": 14
				}],
				61: [function (e, t, r) {
					"use strict";
					t.exports = {
						LANDING_FRAME_NAME: "braintreethreedsecurelanding",
						CARDINAL_SCRIPT_SOURCE: {
							production: "https://songbird.cardinalcommerce.com/edge/v1/songbird.js",
							sandbox: "https://songbirdstag.cardinalcommerce.com/edge/v1/songbird.js"
						}
					}
				}, {}],
				62: [function (e, t, r) {
					"use strict";
					e = e("../../lib/braintree-error");
					t.exports = {
						THREEDS_NOT_ENABLED: {
							type: e.types.MERCHANT,
							code: "THREEDS_NOT_ENABLED",
							message: "3D Secure is not enabled for this merchant."
						},
						THREEDS_CAN_NOT_USE_TOKENIZATION_KEY: {
							type: e.types.MERCHANT,
							code: "THREEDS_CAN_NOT_USE_TOKENIZATION_KEY",
							message: "3D Secure can not use a tokenization key for authorization."
						},
						THREEDS_HTTPS_REQUIRED: {
							type: e.types.MERCHANT,
							code: "THREEDS_HTTPS_REQUIRED",
							message: "3D Secure requires HTTPS."
						},
						THREEDS_NOT_ENABLED_FOR_V2: {
							type: e.types.MERCHANT,
							code: "THREEDS_NOT_ENABLED_FOR_V2",
							message: "3D Secure version 2 is not enabled for this merchant. Contact Braintree Support for assistance at https://help.braintreepayments.com/"
						},
						THREEDS_UNRECOGNIZED_VERSION: {type: e.types.MERCHANT, code: "THREEDS_UNRECOGNIZED_VERSION"},
						THREEDS_CARDINAL_SDK_SETUP_FAILED: {
							type: e.types.UNKNOWN,
							code: "THREEDS_CARDINAL_SDK_SETUP_FAILED",
							message: "Something went wrong setting up Cardinal's Songbird.js library."
						},
						THREEDS_CARDINAL_SDK_SCRIPT_LOAD_FAILED: {
							type: e.types.NETWORK,
							code: "THREEDS_CARDINAL_SDK_SCRIPT_LOAD_FAILED",
							message: "Cardinal's Songbird.js library could not be loaded."
						},
						THREEDS_CARDINAL_SDK_SETUP_TIMEDOUT: {
							type: e.types.UNKNOWN,
							code: "THREEDS_CARDINAL_SDK_SETUP_TIMEDOUT",
							message: "Cardinal's Songbird.js took too long to setup."
						},
						THREEDS_CARDINAL_SDK_RESPONSE_TIMEDOUT: {
							type: e.types.UNKNOWN,
							code: "THREEDS_CARDINAL_SDK_RESPONSE_TIMEDOUT",
							message: "Cardinal's API took too long to respond."
						},
						THREEDS_CARDINAL_SDK_BAD_CONFIG: {
							type: e.types.MERCHANT,
							code: "THREEDS_CARDINAL_SDK_BAD_CONFIG",
							message: "JWT or other required field missing. Please check your setup configuration."
						},
						THREEDS_CARDINAL_SDK_BAD_JWT: {
							type: e.types.MERCHANT,
							code: "THREEDS_CARDINAL_SDK_BAD_JWT",
							message: "Cardinal JWT missing or malformed. Please check your setup configuration."
						},
						THREEDS_CARDINAL_SDK_ERROR: {
							type: e.types.UNKNOWN,
							code: "THREEDS_CARDINAL_SDK_ERROR",
							message: "A general error has occurred with Cardinal. See description for more information."
						},
						THREEDS_CARDINAL_SDK_CANCELED: {
							type: e.types.CUSTOMER,
							code: "THREEDS_CARDINAL_SDK_CANCELED",
							message: "Canceled by user."
						},
						THREEDS_VERIFY_CARD_CANCELED_BY_MERCHANT: {
							type: e.types.MERCHANT,
							code: "THREEDS_VERIFY_CARD_CANCELED_BY_MERCHANT",
							message: "3D Secure verfication canceled by merchant."
						},
						THREEDS_AUTHENTICATION_IN_PROGRESS: {
							type: e.types.MERCHANT,
							code: "THREEDS_AUTHENTICATION_IN_PROGRESS",
							message: "Cannot call verifyCard while existing authentication is in progress."
						},
						THREEDS_MISSING_VERIFY_CARD_OPTION: {
							type: e.types.MERCHANT,
							code: "THREEDS_MISSING_VERIFY_CARD_OPTION"
						},
						THREEDS_JWT_AUTHENTICATION_FAILED: {
							type: e.types.UNKNOWN,
							code: "THREEDS_JWT_AUTHENTICATION_FAILED",
							message: "Something went wrong authenticating the JWT from Cardinal"
						},
						THREEDS_LOOKUP_TOKENIZED_CARD_NOT_FOUND_ERROR: {
							type: e.types.MERCHANT,
							code: "THREEDS_LOOKUP_TOKENIZED_CARD_NOT_FOUND_ERROR",
							message: "Either the payment method nonce passed to `verifyCard` does not exist, or it was already consumed"
						},
						THREEDS_LOOKUP_VALIDATION_ERROR: {
							type: e.types.CUSTOMER,
							code: "THREEDS_LOOKUP_VALIDATION_ERROR",
							message: "The data passed in `verifyCard` did not pass validation checks. See details for more info"
						},
						THREEDS_LOOKUP_ERROR: {
							type: e.types.UNKNOWN,
							code: "THREEDS_LOOKUP_ERROR",
							message: "Something went wrong during the 3D Secure lookup"
						},
						THREEDS_INLINE_IFRAME_DETAILS_INCORRECT: {
							type: e.types.UNKNOWN,
							code: "THREEDS_INLINE_IFRAME_DETAILS_INCORRECT",
							message: "Something went wrong when attempting to add the authentication iframe to the page."
						},
						THREEDS_NO_VERIFICATION_PAYLOAD: {
							type: e.types.MERCHANT,
							code: "THREEDS_NO_VERIFICATION_PAYLOAD",
							message: "No verification payload available."
						},
						THREEDS_TERM_URL_REQUIRES_BRAINTREE_DOMAIN: {
							type: e.types.INTERNAL,
							code: "THREEDS_TERM_URL_REQUIRES_BRAINTREE_DOMAIN",
							message: "Term Url must be on a Braintree domain."
						},
						THREEDS_FRAMEWORK_METHOD_NOT_IMPLEMENTED: {
							type: e.types.INTERNAL,
							code: "THREEDS_FRAMEWORK_METHOD_NOT_IMPLEMENTED",
							message: "Method not implemented for this framework."
						}
					}
				}, {"../../lib/braintree-error": 35}],
				63: [function (e, t, r) {
					"use strict";
					e = e("../../lib/enumerate");
					t.exports = e(["AUTHENTICATION_COMPLETE"], "threedsecure:")
				}, {"../../lib/enumerate": 43}]
			}, {}, [60])(60)
		});
	</script>
	<!-- TutanotaTags --><title>Mail. Done. Right. Tuta Mail Login &amp; Sign up for an Ad-free Mailbox</title>
	<link rel="shortcut icon" type="image/x-icon" href="https://app.tuta.com/images/logo-favicon-152.png">
	<meta name="application-name" content="Tuta Mail">
	<link rel="apple-touch-icon" sizes="152x152" href="https://app.tuta.com/images/logo-favicon-152.png">
	<link rel="icon" sizes="192x192" href="https://app.tuta.com/images/logo-favicon-192.png">
</head>
<body>
<div style="text-align: center; padding: 60px">
	<div style="display: inline-block; padding: 20px 30px; background: #ffffff; border-radius: 5px; filter: drop-shadow(10px 10px 10px #00000088)">
		<noscript>This site requires javascript to be enabled. Please activate it in the settings of your browser.
		</noscript>
		<div style="font-size: 20px; font-family: -apple-system, system-ui, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;">
			<p id="message"></p>
			<p id="message2"></p>
		</div>
	</div>
	<div style="padding-top: 50px">
		<svg id="tuta_x5F_rgb" xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" xml:space="preserve">
<style type="text/css">
	.st0 {
		fill: #410002;
	}

	.st1 {
		fill: #850122;
	}
</style>
			<g>
	<g>
		<path class="st0" d="M238.6,58.1c0-8.8,6.7-19.3,18.1-19.3h8.4l-3,9.6C258.6,59.9,253,67,246.2,67C241.3,67,238.6,63.6,238.6,58.1
			 M195.9,53.3c-4.2,13.5,2.2,22.8,16.7,22.8c2.1,0,4.9-0.2,5.7-0.4c0.4-0.1,0.6-0.3,0.8-0.8l2.5-8.4c0.1-0.5,0-0.9-0.7-0.8
			c-2.2,0.2-4.2,0.4-6,0.4c-7.3,0-10.3-3.9-8.1-10.9l5.1-16.4h14.8c0.4,0,0.7-0.2,0.9-0.7l2.6-8.5c0.1-0.5-0.1-0.8-0.7-0.8H215
			l1.9-6.2c0.1-0.4,0-0.7-0.3-1l-7.7-7c-0.4-0.4-0.9-0.3-1.1,0.3L195.9,53.3z M144.9,53.6c-4.3,13.7,2.6,22.7,13.4,22.7
			c6.2,0,11.1-3,14.6-7.9l-0.1,6.3c0,0.6,0.3,0.8,0.8,0.8h6.9c0.5,0,0.7-0.2,0.9-0.7l13.9-45.1c0.2-0.6-0.1-0.9-0.6-0.9h-9.9
			c-0.5,0-0.8,0.2-0.9,0.7l-5.9,19c-3.7,11.8-9.5,18.5-15.6,18.5c-6.1,0-8.7-4.8-6.4-12.2l7.8-25.1c0.2-0.6-0.1-0.9-0.6-0.9h-9.9
			c-0.5,0-0.7,0.2-0.9,0.7L144.9,53.6z M111.2,53.3c-4.2,13.5,2.2,22.8,16.7,22.8c2.1,0,4.9-0.2,5.7-0.4c0.4-0.1,0.6-0.3,0.8-0.8
			l2.5-8.4c0.1-0.5,0-0.9-0.7-0.8c-2.2,0.2-4.2,0.4-6,0.4c-7.3,0-10.3-3.9-8.1-10.9l5.1-16.4H142c0.4,0,0.8-0.2,0.9-0.7l2.6-8.5
			c0.1-0.5-0.1-0.8-0.7-0.8h-14.6l1.9-6.2c0.1-0.4,0-0.7-0.3-1l-7.7-7c-0.4-0.4-0.9-0.3-1.1,0.3L111.2,53.3z M242.6,76.3
			c5.8,0,10.6-2.6,14.2-7.9v6.3c0,0.5,0.3,0.8,0.8,0.8h6.9c0.5,0,0.7-0.2,0.9-0.7l14-45.2c0.1-0.5-0.1-0.9-0.6-0.9H257
			c-21.3,0-29.6,18.5-29.6,30.5C227.4,69.7,233.9,76.3,242.6,76.3"/>
	</g>
				<path class="st1" d="M7.9,1L25,18.3c0.4,0.4,0.8,0.5,1.4,0.5h72.1c0.5,0,0.8-0.6,0.3-1.1L81.9,0.6C81.5,0.2,81.1,0,80.3,0h-72
		C7.6,0,7.5,0.6,7.9,1"/>
				<path class="st1" d="M5.4,99.2C5.3,99.6,5.5,100,6,100h71.1c0.7,0,1-0.3,1.2-0.9l21.5-69.4c0.2-0.7-0.1-0.9-0.7-0.9H27.8
		c-0.6,0-0.8,0.2-1,0.7L5.4,99.2z"/>
				<path class="st1"
					  d="M0,79.2c0,0.8,1,0.8,1.2,0l16.3-53.1c0.2-0.6,0.2-1-0.3-1.5L1,8.5C0.6,8.1,0,8.3,0,8.8V79.2z"/>
</g>
</svg>
	</div>
</div>
</body>
</html>

